3.44 \(\int \sin ^3(e+f x) (a+b \tan ^2(e+f x))^2 \, dx\)

Optimal. Leaf size=80 \[ \frac{(a-b)^2 \cos ^3(e+f x)}{3 f}-\frac{(a-3 b) (a-b) \cos (e+f x)}{f}+\frac{b (2 a-3 b) \sec (e+f x)}{f}+\frac{b^2 \sec ^3(e+f x)}{3 f} \]

[Out]

-(((a - 3*b)*(a - b)*Cos[e + f*x])/f) + ((a - b)^2*Cos[e + f*x]^3)/(3*f) + ((2*a - 3*b)*b*Sec[e + f*x])/f + (b
^2*Sec[e + f*x]^3)/(3*f)

________________________________________________________________________________________

Rubi [A]  time = 0.083143, antiderivative size = 80, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.087, Rules used = {3664, 448} \[ \frac{(a-b)^2 \cos ^3(e+f x)}{3 f}-\frac{(a-3 b) (a-b) \cos (e+f x)}{f}+\frac{b (2 a-3 b) \sec (e+f x)}{f}+\frac{b^2 \sec ^3(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Int[Sin[e + f*x]^3*(a + b*Tan[e + f*x]^2)^2,x]

[Out]

-(((a - 3*b)*(a - b)*Cos[e + f*x])/f) + ((a - b)^2*Cos[e + f*x]^3)/(3*f) + ((2*a - 3*b)*b*Sec[e + f*x])/f + (b
^2*Sec[e + f*x]^3)/(3*f)

Rule 3664

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sec[e + f*x], x]}, Dist[1/(f*ff^m), Subst[Int[((-1 + ff^2*x^2)^((m - 1)/2)*(a - b + b*ff^2*x^2)^p)/x^(
m + 1), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rule 448

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Int[ExpandI
ntegrand[(e*x)^m*(a + b*x^n)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && NeQ[b*c - a*d, 0] &
& IGtQ[p, 0] && IGtQ[q, 0]

Rubi steps

\begin{align*} \int \sin ^3(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (-1+x^2\right ) \left (a-b+b x^2\right )^2}{x^4} \, dx,x,\sec (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \left ((2 a-3 b) b-\frac{(a-b)^2}{x^4}+\frac{(a-3 b) (a-b)}{x^2}+b^2 x^2\right ) \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac{(a-3 b) (a-b) \cos (e+f x)}{f}+\frac{(a-b)^2 \cos ^3(e+f x)}{3 f}+\frac{(2 a-3 b) b \sec (e+f x)}{f}+\frac{b^2 \sec ^3(e+f x)}{3 f}\\ \end{align*}

Mathematica [A]  time = 0.519778, size = 72, normalized size = 0.9 \[ \frac{\left (-9 a^2+42 a b-33 b^2\right ) \cos (e+f x)+(a-b)^2 \cos (3 (e+f x))+4 b \sec (e+f x) \left (6 a+b \sec ^2(e+f x)-9 b\right )}{12 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[e + f*x]^3*(a + b*Tan[e + f*x]^2)^2,x]

[Out]

((-9*a^2 + 42*a*b - 33*b^2)*Cos[e + f*x] + (a - b)^2*Cos[3*(e + f*x)] + 4*b*Sec[e + f*x]*(6*a - 9*b + b*Sec[e
+ f*x]^2))/(12*f)

________________________________________________________________________________________

Maple [B]  time = 0.049, size = 155, normalized size = 1.9 \begin{align*}{\frac{1}{f} \left ( -{\frac{{a}^{2} \left ( 2+ \left ( \sin \left ( fx+e \right ) \right ) ^{2} \right ) \cos \left ( fx+e \right ) }{3}}+2\,ab \left ({\frac{ \left ( \sin \left ( fx+e \right ) \right ) ^{6}}{\cos \left ( fx+e \right ) }}+ \left ( 8/3+ \left ( \sin \left ( fx+e \right ) \right ) ^{4}+4/3\, \left ( \sin \left ( fx+e \right ) \right ) ^{2} \right ) \cos \left ( fx+e \right ) \right ) +{b}^{2} \left ({\frac{ \left ( \sin \left ( fx+e \right ) \right ) ^{8}}{3\, \left ( \cos \left ( fx+e \right ) \right ) ^{3}}}-{\frac{5\, \left ( \sin \left ( fx+e \right ) \right ) ^{8}}{3\,\cos \left ( fx+e \right ) }}-{\frac{5\,\cos \left ( fx+e \right ) }{3} \left ({\frac{16}{5}}+ \left ( \sin \left ( fx+e \right ) \right ) ^{6}+{\frac{6\, \left ( \sin \left ( fx+e \right ) \right ) ^{4}}{5}}+{\frac{8\, \left ( \sin \left ( fx+e \right ) \right ) ^{2}}{5}} \right ) } \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(f*x+e)^3*(a+b*tan(f*x+e)^2)^2,x)

[Out]

1/f*(-1/3*a^2*(2+sin(f*x+e)^2)*cos(f*x+e)+2*a*b*(sin(f*x+e)^6/cos(f*x+e)+(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*c
os(f*x+e))+b^2*(1/3*sin(f*x+e)^8/cos(f*x+e)^3-5/3*sin(f*x+e)^8/cos(f*x+e)-5/3*(16/5+sin(f*x+e)^6+6/5*sin(f*x+e
)^4+8/5*sin(f*x+e)^2)*cos(f*x+e)))

________________________________________________________________________________________

Maxima [A]  time = 1.07297, size = 108, normalized size = 1.35 \begin{align*} \frac{{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{3} - 3 \,{\left (a^{2} - 4 \, a b + 3 \, b^{2}\right )} \cos \left (f x + e\right ) + \frac{3 \,{\left (2 \, a b - 3 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}{\cos \left (f x + e\right )^{3}}}{3 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^3*(a+b*tan(f*x+e)^2)^2,x, algorithm="maxima")

[Out]

1/3*((a^2 - 2*a*b + b^2)*cos(f*x + e)^3 - 3*(a^2 - 4*a*b + 3*b^2)*cos(f*x + e) + (3*(2*a*b - 3*b^2)*cos(f*x +
e)^2 + b^2)/cos(f*x + e)^3)/f

________________________________________________________________________________________

Fricas [A]  time = 1.93564, size = 193, normalized size = 2.41 \begin{align*} \frac{{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{6} - 3 \,{\left (a^{2} - 4 \, a b + 3 \, b^{2}\right )} \cos \left (f x + e\right )^{4} + 3 \,{\left (2 \, a b - 3 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}{3 \, f \cos \left (f x + e\right )^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^3*(a+b*tan(f*x+e)^2)^2,x, algorithm="fricas")

[Out]

1/3*((a^2 - 2*a*b + b^2)*cos(f*x + e)^6 - 3*(a^2 - 4*a*b + 3*b^2)*cos(f*x + e)^4 + 3*(2*a*b - 3*b^2)*cos(f*x +
 e)^2 + b^2)/(f*cos(f*x + e)^3)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)**3*(a+b*tan(f*x+e)**2)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.74691, size = 194, normalized size = 2.42 \begin{align*} \frac{6 \, a b \cos \left (f x + e\right )^{2} - 9 \, b^{2} \cos \left (f x + e\right )^{2} + b^{2}}{3 \, f \cos \left (f x + e\right )^{3}} + \frac{a^{2} f^{11} \cos \left (f x + e\right )^{3} - 2 \, a b f^{11} \cos \left (f x + e\right )^{3} + b^{2} f^{11} \cos \left (f x + e\right )^{3} - 3 \, a^{2} f^{11} \cos \left (f x + e\right ) + 12 \, a b f^{11} \cos \left (f x + e\right ) - 9 \, b^{2} f^{11} \cos \left (f x + e\right )}{3 \, f^{12}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^3*(a+b*tan(f*x+e)^2)^2,x, algorithm="giac")

[Out]

1/3*(6*a*b*cos(f*x + e)^2 - 9*b^2*cos(f*x + e)^2 + b^2)/(f*cos(f*x + e)^3) + 1/3*(a^2*f^11*cos(f*x + e)^3 - 2*
a*b*f^11*cos(f*x + e)^3 + b^2*f^11*cos(f*x + e)^3 - 3*a^2*f^11*cos(f*x + e) + 12*a*b*f^11*cos(f*x + e) - 9*b^2
*f^11*cos(f*x + e))/f^12